﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace NetCoreCMS.Web.Areas.WebApi.Controllers
{
    /// <summary>
    /// 得到用户实体
    /// </summary>
    public class User_Check_LoginController : UserController
    {
        [Authorize]
        [HttpGet]
        public ActionResult<IEnumerable<string>> Get()
        {
            var user=GetUserInfo();
            if(user==null)
                return Ok(new { status = 0, msg = "温馨提示：请重新登录！" });
            return Ok(new { user = user });
        }
    }
}